printk(" %lx", si->net_rings[i]);
}; printk("\n");
printk(" blk_ring: 0x%lx\n", si->blk_ring);
-#endif
printk(" dom_id: %ld\n", si->dom_id);
+#endif
printk(" flags: 0x%lx\n", si->flags);
printk(" cmd_line: %s\n", si->cmd_line ? (const char *)si->cmd_line : "NULL");
rmb();
shadow_tv.tv_sec = HYPERVISOR_shared_info->wc_sec;
shadow_tv.tv_usec = HYPERVISOR_shared_info->wc_usec;
- shadow_tsc_stamp = HYPERVISOR_shared_info->tsc_timestamp;
+ shadow_tsc_stamp = HYPERVISOR_shared_info->tsc_timestamp.tsc_bits;
shadow_system_time = HYPERVISOR_shared_info->system_time;
rmb();
}
__cpu_khz = HYPERVISOR_shared_info->cpu_freq;
cpu_khz = (u32) (__cpu_khz/1000);
- rdtsc_bitshift = HYPERVISOR_shared_info->rdtsc_bitshift;
+ rdtsc_bitshift = HYPERVISOR_shared_info->tsc_timestamp.tsc_bitshift;
cpu_freq = HYPERVISOR_shared_info->cpu_freq;
scale = 1000000LL << (32 + rdtsc_bitshift);
si->time_version1++;
wmb();
- /* NB. These two values don't actually ever change. */
si->cpu_freq = cpu_freq;
- si->arch.rdtsc_bitshift = rdtsc_bitshift;
-
+ si->tsc_timestamp.tsc_bitshift = rdtsc_bitshift;
+ si->tsc_timestamp.tsc_bits = tsc_irq;
si->system_time = stime_irq;
- si->tsc_timestamp = tsc_irq;
si->wc_sec = xtime.tv_sec;
si->wc_usec = xtime.tv_usec;
si->wc_usec += (jiffies - wall_jiffies) * (1000000 / HZ);
unsigned long ss;
} execution_context_t;
-/*
- * Shared info specific to the architecture in question
- */
-typedef struct arch_shared_info_st {
- unsigned int rdtsc_bitshift; /* tsc_timestamp uses N:N+31 of TSC. */
-} arch_shared_info_t;
-
+typedef struct {
+ unsigned long tsc_bits; /* 32 bits read from the CPU's TSC. */
+ unsigned int tsc_bitshift; /* 'tsc_bits' uses N:N+31 of TSC. */
+} tsc_timestamp_t;
/*
* The following is all CPU context. Note that the i387_ctxt block is filled
unsigned long ss;
} execution_context_t;
-/*
- * Xen/guestos shared data -- pointer provided in start_info.
- * NB. We expect that this struct is smaller than a page.
- */
-typedef struct arch_shared_info_st {
- unsigned int rdtsc_bitshift; /* tsc_timestamp uses N:N+31 of TSC. */
-} arch_shared_info_t;
-
+typedef struct {
+ unsigned long tsc_bits; /* 32 bits read from the CPU's TSC. */
+ unsigned int tsc_bitshift; /* 'tsc_bits' uses N:N+31 of TSC. */
+} tsc_timestamp_t;
/*
* The following is all CPU context. Note that the i387_ctxt block is filled
* Time: The following abstractions are exposed: System Time, Clock Time,
* Domain Virtual Time. Domains can access Cycle counter time directly.
*/
-
u64 cpu_freq; /* CPU frequency (Hz). */
/*
*/
unsigned long time_version1; /* A version number for info below. */
unsigned long time_version2; /* A version number for info below. */
- unsigned long tsc_timestamp; /* TSC at last update of time vals. */
+ tsc_timestamp_t tsc_timestamp; /* TSC at last update of time vals. */
u64 system_time; /* Time, in nanosecs, since boot. */
unsigned long wc_sec; /* Secs 00:00:00 UTC, Jan 1, 1970. */
unsigned long wc_usec; /* Usecs 00:00:00 UTC, Jan 1, 1970. */
-
- /* Domain Virtual Time */
- u64 domain_time;
-
+ u64 domain_time; /* Domain virtual time, in nanosecs. */
+
/*
* Timeout values:
* Allow a domain to specify a timeout value in system time and
* domain virtual time.
*/
-
u64 wall_timeout;
u64 domain_timeout;
net_idx_t net_idx[MAX_DOMAIN_VIFS];
execution_context_t execution_context;
- arch_shared_info_t arch;
} shared_info_t;
@$(MAKEBOOT) clean
archmrproper:
+ rm -f include/asm-xeno/hypervisor-ifs/arch
archdep:
+ rm -f include/asm-xeno/hypervisor-ifs/arch
+ ( cd include/asm-xeno/hypervisor-ifs ; ln -sf arch-$(SUBARCH) arch)
@$(MAKEBOOT) dep
rmb();
shadow_tv.tv_sec = HYPERVISOR_shared_info->wc_sec;
shadow_tv.tv_usec = HYPERVISOR_shared_info->wc_usec;
- shadow_tsc_stamp = HYPERVISOR_shared_info->tsc_timestamp;
+ shadow_tsc_stamp = HYPERVISOR_shared_info->tsc_timestamp.tsc_bits;
shadow_system_time = HYPERVISOR_shared_info->system_time;
rmb();
}
xtime.tv_usec = HYPERVISOR_shared_info->wc_usec;
processed_system_time = shadow_system_time;
- rdtsc_bitshift = HYPERVISOR_shared_info->rdtsc_bitshift;
+ rdtsc_bitshift = HYPERVISOR_shared_info->tsc_timestamp.tsc_bitshift;
cpu_freq = HYPERVISOR_shared_info->cpu_freq;
scale = 1000000LL << (32 + rdtsc_bitshift);